from car import car
import time
import random
import config

class basicRoute(object):

    def __init__(self,ID):
        self.listOfEdges = []
        self.ID = str(ID)
        self.jakisParametr = 0.76
        self.routeMu = config.routeMu
        self.routeSigma = config.routeSigma 
        
    def addEdge(self, edge):
        self.listOfEdges += [edge]
        
    def get(self,i):
        return self.listOfEdges[i]
    
    def getEdges(self):
        return self.listOfEdges
    
    def length(self):
        return len(self.listOfEdges)
    
    def hasEdge(self, edge):
        return edge in self.listOfEdges
    
    def copy(self):
        returnValue = []
        for elem in self.listOfEdges:
            returnValue += [elem]
        return returnValue
        
    def replace(self, edge, edgeList):
        newList = []
        for e in self.listOfEdges:
            if e == edge:
                newList.extend(edgeList)
            else:
                newList.append(e)
        self.listOfEdges = newList
    
